@echo off
REM 创建 Vue 文件的批处理脚本
REM 确保在正确的目录下运行（如 src/components/Views/order）

REM 创建 OrderList.vue
(
  echo ^<script setup lang="ts"^>
  echo import { useRoute } from "vue-router";
  echo const route = useRoute();
  echo ^</script^>
  echo.
  echo ^<template^>
  echo   {{ route.query }}
  echo ^</template^>
  echo.
  echo ^<style scoped^>
  echo ^</style^>
) > "OrderList.vue"

REM 创建 OrderBill.vue
(
  echo ^<script setup lang="ts"^>
  echo import { useRoute } from "vue-router";
  echo const route = useRoute();
  echo ^</script^>
  echo.
  echo ^<template^>
  echo   {{ route.query }}
  echo ^</template^>
  echo.
  echo ^<style scoped^>
  echo ^</style^>
) > "OrderBill.vue"

REM 创建 OrderComments.vue
(
  echo ^<script setup lang="ts"^>
  echo import { useRoute } from "vue-router";
  echo const route = useRoute();
  echo ^</script^>
  echo.
  echo ^<template^>
  echo   {{ route.query }}
  echo ^</template^>
  echo.
  echo ^<style scoped^>
  echo ^</style^>
) > "OrderComments.vue"

REM 创建 OrderMonitor.vue
(
  echo ^<script setup lang="ts"^>
  echo import { useRoute } from "vue-router";
  echo const route = useRoute();
  echo ^</script^>
  echo.
  echo ^<template^>
  echo   {{ route.query }}
  echo ^</template^>
  echo.
  echo ^<style scoped^>
  echo ^</style^>
) > "OrderMonitor.vue"

echo ✅ Vue 文件已成功创建！
pause